<template>
  <div class="page_body">
    <div class="home_top">
      <img
        class="home_top_back"
        src="../../assets/image/black_icon01.png"
        alt="返回"
        @click="toBackFn()"
      />
      <div class="home_top_title">{{ topTitle }}</div>
    </div>
    <div class="referee_register_body">
      <div
        style="
          width: 100vw;
          display: flex;
          flex-direction: column;
          align-items: center;
        "
      >
        <div class="referee_register_from_box">
          <!-- 实名认证栏 -->
          <div>
            <div class="referee_register_from_item border_item">
              <div class="border_item_popup_box" style="height: 100%">
                <div class="referee_register_from_upload_img">
                  <div class="border_item_title">
                    <div class="border_item_title_tips">*</div>
                    照片
                  </div>
                  <div
                    class="border_item_popup no_value_item"
                    style="width: 4.8rem; height: 0.94rem; line-height: 0.94rem"
                  ></div>
                </div>

                <div class="upload_img_box">
                  <img
                    v-if="userData.photo == null || userData.photo == ''"
                    class="upload_img_box_icon"
                    src="../../assets/image/upload_img_bg03.png"
                  />
                  <img
                    v-if="userData.photo != null && userData.photo != ''"
                    class="upload_img_box_icon"
                    :src="userData.photo"
                  />
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>
            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                姓名
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入姓名"
                type="text"
                v-model="userData.name"
                maxlength="6"
                :disabled="!inputKey"
              />
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                国籍
              </div>
              <div class="border_item_popup_box">
                <div
                  :class="[
                    userData.country == '请选择'
                      ? 'border_item_popup no_value_item'
                      : 'border_item_popup',
                  ]"
                >
                  {{ userData.country }}
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                请选择性别
              </div>
              <div class="border_item_popup_box">
                <div
                  :class="[
                    userData.sex == '请选择'
                      ? 'border_item_popup no_value_item'
                      : 'border_item_popup',
                  ]"
                >
                  {{ userData.sex }}
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                证件类型
              </div>
              <div class="border_item_popup_box">
                <div
                  :class="[
                    identityTypevalueObj.label == '请选择'
                      ? 'border_item_popup no_value_item'
                      : 'border_item_popup',
                  ]"
                >
                  {{ identityTypevalueObj.label }}
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                证件号
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入证件号"
                type="text"
                v-model="userData.identity_number"
                maxlength="20"
                :disabled="!inputKey"
              />
            </div>

            <div class="form_title">
              <div class="border_item_title_tips">*</div>
              常住地址
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                省
              </div>
              <div class="border_item_popup_box">
                <div
                  :class="[
                    userData.province == '请选择'
                      ? 'border_item_popup no_value_item'
                      : 'border_item_popup',
                  ]"
                >
                  {{ userData.province }}
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>

            <div
              class="referee_register_from_item border_item"
              style="flex-direction: row; justify-content: space-between"
            >
              <div class="border_item_child">
                <div class="border_item_title">
                  <div class="border_item_title_tips">*</div>
                  市
                </div>
                <div class="border_item_popup_box">
                  <div
                    :class="[
                      userData.city == '请选择'
                        ? 'border_item_popup no_value_item'
                        : 'border_item_popup',
                    ]"
                    style="width: 100%"
                  >
                    {{ userData.city }}
                  </div>
                </div>
              </div>
              <div class="border_item_child">
                <div class="border_item_title">
                  <div class="border_item_title_tips">*</div>
                  区
                </div>
                <div class="border_item_popup_box">
                  <div
                    :class="[
                      userData.region == '请选择'
                        ? 'border_item_popup no_value_item'
                        : 'border_item_popup',
                    ]"
                    style="width: 100%"
                  >
                    {{ userData.region }}
                  </div>
                </div>
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                政治面貌
              </div>
              <div class="border_item_popup_box">
                <div
                  :class="[
                    userData.political_status == '请选择'
                      ? 'border_item_popup no_value_item'
                      : 'border_item_popup',
                  ]"
                >
                  {{ userData.political_status }}
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>

            <div
              class="referee_register_from_item upload_img_item"
              style="justify-content: space-around; margin-top: 0.4rem"
              v-show="userData.identity_type != 0"
            >
              <div class="upload_file_box" v-show="userData.identity_type == 1">
                <img
                  v-if="
                    userData.identity_up == null || userData.identity_up == ''
                  "
                  class="upload_file_box_img"
                  src="../../assets/image/identity_up_img01.png"
                />
                <img
                  v-if="
                    userData.identity_up != null && userData.identity_up != ''
                  "
                  class="upload_file_box_img"
                  :src="userData.identity_up"
                />
                <div class="upload_file_box_btn">+上传身份证人像面</div>
              </div>
              <div class="upload_file_box" v-show="userData.identity_type == 1">
                <img
                  v-if="
                    userData.identity_down == null ||
                    userData.identity_down == ''
                  "
                  class="upload_file_box_img"
                  src="../../assets/image/identity_down_img01.png"
                />
                <img
                  v-if="
                    userData.identity_down != null &&
                    userData.identity_down != ''
                  "
                  class="upload_file_box_img"
                  :src="userData.identity_down"
                />
                <div class="upload_file_box_btn">+上传身份证国徽面</div>
              </div>
              <div class="upload_file_box" v-show="userData.identity_type == 2">
                <img
                  v-if="
                    userData.identity_up == null || userData.identity_up == ''
                  "
                  class="upload_file_box_img"
                  src="../../assets/image/upload_img_bg02.png"
                />
                <img
                  v-if="
                    userData.identity_up != null && userData.identity_up != ''
                  "
                  class="upload_file_box_img"
                  :src="userData.identity_up"
                />
                <div class="upload_file_box_btn">+护照个人信息页</div>
              </div>
              <div class="upload_file_box" v-show="userData.identity_type == 2">
                <img
                  v-if="
                    userData.identity_down == null ||
                    userData.identity_down == ''
                  "
                  class="upload_file_box_img"
                  src="../../assets/image/upload_img_bg02.png"
                />
                <img
                  v-if="
                    userData.identity_down != null &&
                    userData.identity_down != ''
                  "
                  class="upload_file_box_img"
                  :src="userData.identity_down"
                />
                <div class="upload_file_box_btn">+护照有效签证页</div>
              </div>
              <div
                class="upload_file_box"
                v-show="
                  userData.identity_type == 3 || userData.identity_type == 4
                "
              >
                <img
                  v-if="
                    userData.identity_up == null || userData.identity_up == ''
                  "
                  class="upload_file_box_img"
                  src="../../assets/image/upload_img_bg02.png"
                />
                <img
                  v-if="
                    userData.identity_up != null && userData.identity_up != ''
                  "
                  class="upload_file_box_img"
                  :src="userData.identity_up"
                />
                <div class="upload_file_box_btn">+证件照片</div>
              </div>
            </div>
          </div>
          <!-- 注册信息栏 -->
          <div>
            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                注册所在地
              </div>
              <div class="border_item_popup_box">
                <div
                  :class="[
                    userData.register_region == '请选择'
                      ? 'border_item_popup no_value_item'
                      : 'border_item_popup',
                  ]"
                >
                  {{
                    userData.register_region == "请选择"
                      ? "请选择您的注册所在地"
                      : userData.register_region
                  }}
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                民族
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的民族"
                type="text"
                v-model="userData.nation"
                maxlength="6"
                :disabled="!inputKey"
              />
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                籍贯
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的籍贯"
                type="text"
                v-model="userData.native_place"
                maxlength="10"
                :disabled="!inputKey"
              />
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                学历
              </div>
              <div class="border_item_popup_box">
                <div
                  :class="[
                    userData.education == '请选择'
                      ? 'border_item_popup no_value_item'
                      : 'border_item_popup',
                  ]"
                >
                  {{ userData.education }}
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                外语语种
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的外语语种"
                type="text"
                v-model="userData.foreign_language"
                maxlength="10"
                :disabled="!inputKey"
              />
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                外语水平
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的外语水平"
                type="text"
                v-model="userData.foreign_language_level"
                maxlength="10"
                :disabled="!inputKey"
              />
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                服装尺寸
                <div class="form_tips_box" @click="viewSizeListFn()">
                  (
                  <img
                    class="view_size_icon"
                    src="../../assets/image/wenhao_icon01.png"
                  />
                  点击查看尺码表)
                </div>
              </div>
              <div class="border_item_popup_box">
                <div
                  :class="[
                    userData.clothes_size == '请选择'
                      ? 'border_item_popup no_value_item'
                      : 'border_item_popup',
                  ]"
                >
                  {{ userData.clothes_size }}
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                鞋码尺寸
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的鞋码尺寸"
                type="number"
                v-model="userData.shoe_size"
                maxlength="5"
                :disabled="!inputKey"
              />
            </div>

            <div
              class="referee_register_from_item border_item"
              style="flex-direction: row; justify-content: space-between"
            >
              <div class="border_item_child">
                <div class="border_item_title">
                  <div class="border_item_title_tips">*</div>
                  身高
                </div>
                <div style="display: flex; align-items: center">
                  <input
                    class="referee_register_from_item_input"
                    placeholder="请输入您的身高"
                    type="number"
                    v-model="userData.height"
                    maxlength="6"
                    :disabled="!inputKey"
                    style="width: 2.2rem"
                  />
                  <div style="color: #333333; font-size: 0.28rem">CM</div>
                </div>
              </div>
              <div class="border_item_child">
                <div class="border_item_title">
                  <div class="border_item_title_tips">*</div>
                  体重
                </div>
                <div style="display: flex; align-items: center">
                  <input
                    class="referee_register_from_item_input"
                    placeholder="请输入您的体重"
                    type="number"
                    v-model="userData.weight"
                    maxlength="6"
                    :disabled="!inputKey"
                    style="width: 2.2rem"
                  />
                  <div style="color: #333333; font-size: 0.28rem">KG</div>
                </div>
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                工作或学习单位
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的工作或学习单位"
                type="text"
                v-model="userData.company"
                maxlength="20"
                :disabled="!inputKey"
              />
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                常住地址
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的常住地址"
                type="text"
                v-model="userData.address"
                maxlength="20"
                :disabled="!inputKey"
              />
            </div>
          </div>
          <!-- 信息完善 -->
          <div>
            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                裁判员等级:
              </div>
              <div class="border_item_popup_box">
                <div
                  :class="[
                    userData.referee_level == '请选择'
                      ? 'border_item_popup no_value_item'
                      : 'border_item_popup',
                  ]"
                >
                  {{ userData.referee_level }}
                </div>
                <img
                  src="../../assets/image/to_icon03.png"
                  class="popup_icon"
                />
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                现批准年份:
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的现批准年份"
                type="text"
                v-model="userData.start_date"
                maxlength="20"
                :disabled="!inputKey"
              />
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                现批准单位:
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的现批准单位"
                type="text"
                v-model="userData.referee_region"
                maxlength="20"
                :disabled="!inputKey"
              />
            </div>

            <div class="form_title">
              <div class="border_item_title_tips">*</div>
              执裁经历：
            </div>
            <div
              class="referee_register_from_item"
              style="height: auto; margin-bottom: 0.32rem"
            >
              <div class="tournament_shanghai_list">
                <div
                  class="tournament_shanghai_list_item"
                  v-for="(item, index) in userData.tournament_shanghai_val"
                  :key="index"
                >
                  <div class="tournament_shanghai_list_item_box">
                    <div class="tournament_shanghai_list_item_title">
                      赛事: {{ item.year ? item.year + "年" : ""
                      }}{{ item.title }}
                    </div>
                    <div class="tournament_shanghai_list_item_position">
                      职位: {{ item.position.first == 1 ? "主裁判员" : ""
                      }}{{
                        item.position.first == 1 &&
                        (item.position.assistant == 1 ||
                          item.position.record == 1)
                          ? "、"
                          : ""
                      }}{{ item.position.assistant == 1 ? "助理裁判员" : ""
                      }}{{
                        item.position.assistant == 1 &&
                        item.position.record == 1
                          ? "、"
                          : ""
                      }}{{ item.position.record == 1 ? "记录台人员" : "" }}
                    </div>
                  </div>
                </div>
              </div>
            </div>

            <div class="form_title">
              <div class="border_item_title_tips">*</div>
              裁判员证件信息页
              <img
                class="view_size_icon"
                src="../../assets/image/wenhao_icon01.png"
                style="margin: 0.06rem 0px 0px 0.12rem"
              />
            </div>

            <div
              class="referee_register_from_item"
              style="
                height: auto;
                margin-bottom: 0.26rem;
                flex-direction: row;
                justify-content: space-between;
              "
            >
              <div class="upload_file_box_noBtn">
                <div
                  class="upload_file_box_noBtn_bg"
                  v-if="
                    userData.pic_first == '' ||
                    userData.pic_first == null ||
                    userData.pic_first == undefined
                  "
                >
                  <img
                    class="upload_file_box_noBtn_icon"
                    src="../../assets/image/upload_img_icon01.png"
                  />
                  <div class="upload_file_box_noBtn_tips">裁判员证件照片页</div>
                </div>
                <img
                  class="upload_file_box_noBtn_img"
                  v-else
                  :src="userData.pic_first"
                />
              </div>

              <div class="upload_file_box_noBtn">
                <div
                  class="upload_file_box_noBtn_bg"
                  v-if="
                    userData.pic_second == '' ||
                    userData.pic_second == null ||
                    userData.pic_second == undefined
                  "
                >
                  <img
                    class="upload_file_box_noBtn_icon"
                    src="../../assets/image/upload_img_icon01.png"
                  />
                  <div class="upload_file_box_noBtn_tips">裁判员证件等级页</div>
                </div>
                <img
                  class="upload_file_box_noBtn_img"
                  v-else
                  :src="userData.pic_second"
                />
              </div>
            </div>

            <div
              class="referee_register_from_item"
              style="height: auto; margin-bottom: 0.34rem"
            >
              <div class="upload_file_box_noBtn">
                <div
                  class="upload_file_box_noBtn_bg"
                  v-if="
                    userData.pic_third == '' ||
                    userData.pic_third == null ||
                    userData.pic_third == undefined
                  "
                >
                  <img
                    class="upload_file_box_noBtn_icon"
                    src="../../assets/image/upload_img_icon01.png"
                  />
                  <div class="upload_file_box_noBtn_tips">裁判员证件其他页</div>
                </div>
                <img
                  class="upload_file_box_noBtn_img"
                  v-else
                  :src="userData.pic_third"
                />
              </div>
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                个人账户开户支行（用于发放劳务经费）
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="如XX银行XX市XX支行"
                type="text"
                v-model="userData.bank_name"
                maxlength="30"
                :disabled="!inputKey"
              />
            </div>

            <div class="referee_register_from_item border_item">
              <div class="border_item_title">
                <div class="border_item_title_tips">*</div>
                个人账户开户账号
              </div>
              <input
                class="referee_register_from_item_input"
                placeholder="请输入您的个人账户开户账号"
                type="number"
                v-model="userData.bank_account_number"
                maxlength="30"
                :disabled="!inputKey"
              />
            </div>

            <!-- <div class="form_title">
              <div class="border_item_title_tips">*</div>
              银行卡正反面照片
            </div>
            <div
              class="referee_register_from_item"
              style="
                height: auto;
                flex-direction: row;
                justify-content: space-between;
              "
            >
              <div class="upload_file_box_noBtn">
                <div
                  class="upload_file_box_noBtn_bg"
                  v-if="
                    userData.bank_card_front == '' ||
                    userData.bank_card_front == null ||
                    userData.bank_card_front == undefined
                  "
                >
                  <img
                    class="upload_file_box_noBtn_icon"
                    src="../../assets/image/upload_img_icon01.png"
                  />
                  <div class="upload_file_box_noBtn_tips">银行卡正面</div>
                </div>
                <img
                  class="upload_file_box_noBtn_img"
                  v-else
                  :src="userData.bank_card_front"
                />
              </div>

              <div class="upload_file_box_noBtn">
                <div
                  class="upload_file_box_noBtn_bg"
                  v-if="
                    userData.bank_cark_back == '' ||
                    userData.bank_cark_back == null ||
                    userData.bank_cark_back == undefined
                  "
                >
                  <img
                    class="upload_file_box_noBtn_icon"
                    src="../../assets/image/upload_img_icon01.png"
                  />
                  <div class="upload_file_box_noBtn_tips">银行卡反面</div>
                </div>
                <img
                  class="upload_file_box_noBtn_img"
                  v-else
                  :src="userData.bank_cark_back"
                />
              </div>
            </div> -->
          </div>
          <div class="referee_register_from_send_btn" @click="toBackFn()">
            返回
          </div>
        </div>
      </div>
    </div>

    <!-- 尺码表 -->
    <div class="size_list_body" v-show="sizeListShow">
      <div class="size_list_box">
        <img
          src="../../assets/image/close_icon02.png"
          class="size_list_close"
          @click="closeSizeListFn()"
        />
        <div class="size_list">
          <div class="size_list_title">服装尺码表</div>
          <div class="size_list_item_top">
            <div class="size_list_item_top_val">尺码</div>
            <div class="size_list_item_top_val">身高(cm)</div>
            <div class="size_list_item_top_val">体重(斤)</div>
            <div class="size_list_item_top_val">胸围(cm)</div>
            <div class="size_list_item_top_val">臀围(cm)</div>
          </div>
          <div
            class="size_list_item"
            v-for="(item, index) in sizeListData"
            :key="index"
          >
            <div class="size_list_item_val">{{ item.size }}</div>
            <div class="size_list_item_val">{{ item.height }}</div>
            <div class="size_list_item_val">{{ item.weight }}</div>
            <div class="size_list_item_val">{{ item.bust }}</div>
            <div class="size_list_item_val">{{ item.hipline }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<style src="../../assets/css/referee/refereeRegisterView.css" scoped></style>

<script>
import { Toast } from "mint-ui";

export default {
  name: "RefereeRegisterView",
  components: {},
  data() {
    return {
      baseAPIUrl: this.$store.state.baseAPIUrl,
      topTitle: "查看详情",
      userData: {
        name: "", // 姓名
        photo: "", // 照片
        sex: "请选择", // 性别
        country: "请选择", // 国籍
        identity_type: 0, // 证件类型 1：身份证 2：护照 3：港、澳、台胞证件 4：其它
        identity_number: "", // 证件号
        identity_up: "", // 证件正面
        identity_down: "", // 证件反面
        province: "请选择", // 省
        city: "请选择", // 城市
        region: "请选择", // 区域
        political_status: "请选择", // 政治面貌
        clothes_size: "请选择", // 服装尺寸
        shoe_size: "", // 鞋码
        height: "", // 身高
        weight: "", // 体重
        company: "", // 工作单位
        address: "", // 常住地址
        register_region: "请选择", // 注册所在地
        nation: "", // 民族
        native_place: "", // 籍贯
        education: "请选择", // 学历
        foreign_language: "", // 外语语种
        foreign_language_level: "", // 外语水平
        referee_level: "", // 裁判员等级
        start_date: "", // 现级别批准年份
        referee_region: "", // 现级别批准单位
        tournament_country: false, // 执教经历--国家级赛事
        tournament_country_val: "",
        tournament_shanghai: false, // 执教经历--上海市赛事
        tournament_shanghai_val: "",
        pic_first: "", // 裁判员证件第一页
        pic_second: "", // 裁判员证件第二页
        pic_third: "", // 裁判员证件第三页
        bank_name: "", // 个人账户开户支行
        bank_account_number: "", // 个人账户开户账号
        // bank_card_front: "", // 银行卡正面
        // bank_cark_back: "", // 银行卡反面
      },
      identityTypevalueObj: {
        value: 0,
        label: "请选择",
      }, // 证件类型选择值
      userCoachId: "", // 学员ID
      inputKey: false,
      sizeListShow: false, // 尺码表显示控制
      sizeListData: [
        {
          size: "男士L",
          height: "160-170",
          weight: "105-125",
          bust: "82-90",
          hipline: "84-92",
        },
        {
          size: "男士XL",
          height: "165-175",
          weight: "125-145",
          bust: "88-96",
          hipline: "90-98",
        },
        {
          size: "男士2XL",
          height: "170-180",
          weight: "145-165",
          bust: "94-102",
          hipline: "96-104",
        },
        {
          size: "男士3XL",
          height: "175-185",
          weight: "165-185",
          bust: "100-108",
          hipline: "102-110",
        },
        {
          size: "男士4XL",
          height: "180-190",
          weight: "185-220",
          bust: "106-114",
          hipline: "108-116",
        },
        {
          size: "女士M",
          height: "160-170",
          weight: "90-110",
          bust: "82-90",
          hipline: "84-92",
        },
        {
          size: "女士L",
          height: "165-175",
          weight: "110-120",
          bust: "88-96",
          hipline: "90-98",
        },
        {
          size: "女士XL",
          height: "170-180",
          weight: "120-130",
          bust: "94-102",
          hipline: "96-104",
        },
        {
          size: "女士2XL",
          height: "175-185",
          weight: "130-140",
          bust: "100-108",
          hipline: "102-110",
        },
        {
          size: "女士3XL",
          height: "180-190",
          weight: "140-160",
          bust: "106-114",
          hipline: "108-116",
        },
      ], // 尺码表数据
      refereeLevelList: [
        {
          value: 1,
          label: "三级",
        },
        {
          value: 2,
          label: "二级",
        },
        {
          value: 3,
          label: "一级",
        },
        {
          value: 4,
          label: "国家级",
        },
        {
          value: 5,
          label: "国际级",
        },
      ], // 裁判等级值字典
    };
  },
  created: function () {
    this.getDetailDataFn();
  },
  methods: {
    // 获取用户信息
    getDetailDataFn: function () {
      let that = this;
      let url = "/mobile/getUserInfo";
      let data = {};
      this.axios
        .post(url, data)
        .then((response) => {
          if (response.code == 0) {
            that.userData.name = response.info.name;
            that.userData.photo = response.info.photo;
            that.userData.sex = response.info.sex;
            that.userData.country = response.info.country;
            that.userData.identity_type = response.info.identity_type;
            that.userData.identity_number = response.info.identity_number;
            that.userData.identity_up = response.info.identity_up;
            that.userData.identity_down = response.info.identity_down;
            that.userData.province = response.info.province;
            that.userData.city = response.info.city;
            that.userData.region = response.info.region;
            that.userData.political_status = response.info.political_status;
            that.userData.clothes_size = response.info.clothes_size;
            that.userData.shoe_size = response.info.shoe_size;
            that.userData.height = response.info.height;
            that.userData.weight = response.info.weight;
            that.userData.company = response.info.company;
            that.userData.address = response.info.address;
            that.userData.register_region = response.info.register_region;
            that.identityTypevalueObj.value = response.info.identity_type;
            if (response.info.identity_type == 1) {
              that.identityTypevalueObj.label = "身份证";
            }
            if (response.info.identity_type == 2) {
              that.identityTypevalueObj.label = "护照";
            }
            if (response.info.identity_type == 3) {
              that.identityTypevalueObj.label = "港、澳、台胞证件";
            }
            if (response.info.identity_type == 4) {
              that.identityTypevalueObj.label = "其他";
            }
            that.userData.nation = response.info.nation;
            that.userData.native_place = response.info.native_place;
            that.userData.education = response.info.education;
            that.userData.foreign_language = response.info.foreign_language;
            that.userData.foreign_language_level =
              response.info.foreign_language_level;
            let levelLabel = 0;
            that.refereeLevelList.forEach((k) => {
              if (k.value == response.info.referee_level) {
                levelLabel = k.label;
              }
            });
            that.userData.referee_level = levelLabel;
            that.userData.start_date = response.info.start_date;
            that.userData.referee_region = response.info.referee_region;
            that.userData.tournament_country_val =
              response.info.tournament_country;
            that.userData.tournament_shanghai_val =
              response.info.tournament_shanghai;
            that.userData.pic_first = response.info.pic_first;
            that.userData.pic_second = response.info.pic_second;
            that.userData.pic_third = response.info.pic_third;
            that.userData.bank_name = response.info.bank_name;
            that.userData.bank_account_number =
              response.info.bank_account_number;
            // that.userData.bank_card_front = response.info.bank_card_front;
            // that.userData.bank_cark_back = response.info.bank_cark_back;
          } else {
            Toast({
              message: response.msg,
              duration: 3000,
            });
          }
        })
        .catch(function (error) {
          console.log(error);
        });
    },

    // 查看尺码表
    viewSizeListFn: function () {
      this.sizeListShow = true;
    },

    // 关闭查看尺码表
    closeSizeListFn: function () {
      this.sizeListShow = false;
    },

    // 返回
    toBackFn: function () {
      this.$router.go(-1);
    },
  },
};
</script>
